﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace SmashedApples.Data.Commands
{
    public class SelectCommand : BaseCommand
    {

        public SelectCommand(){}

        public SelectCommand(String table)
        {
            this.table = table;
        }

        public SelectCommand(String table, Hashtable parameters)
		{
            this.table = table;
            this.parameters = (Hashtable)parameters.Clone();
		}


        public Hashtable parameters = new Hashtable();
		
		public String likeColumns = "";
		
		public String inColumns = "";
		
		public int maxRows;

        public String columns = "*";

		private String Where;
        public String where
        {
            get { return Where; }
            set
            {
                if (Where != null)
                {
                    Where += " AND " + value;
                }
                else
                {
                    Where = value;
                }
            }
        }

        private String OrderBy;
        public String orderBy
        {
            get { return OrderBy; }
            set
            {
                if (OrderBy == null)
                    OrderBy = value.ToUpper();
            }
        }
		
		
    }
}
